<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>css</title>
  <style>
    body {
      margin: 0;
      padding: 0;
      position: relative;
    }

    .container {
      --scale: 1.25;
      --rotation: 360deg;
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 55vmin;
      height: 55vmin;
      display: grid;
      margin: 0 auto;
      grid-template-columns: 1fr 1fr 1fr;
      grid-template-rows: 1fr 1fr 1fr;
      gap: 4px;
      grid-template-areas:
        "E B B"
        "E A C"
        "D D C";
    }

    .container>div {
      position: relative;
      overflow: hidden;
      border: 3px solid #431312;
      border-radius: 5px;
    }

    .A {
      grid-area: A;
    }

    .B {
      grid-area: B;
    }

    .C {
      grid-area: C;
    }

    .D {
      grid-area: D;
    }

    .E {
      grid-area: E;
    }

    .container>div>img {
      --scale: 1;
      --rotation: -360deg;
      position: absolute;
      width: 240%;
      height: 240%;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      object-fit: cover;
      object-position: center;
    }

    .container,
    .container>div>img {
      animation: 10s scale-up both ease-in-out infinite alternate;
    }

    @keyframes scale-up {
      0% {
        transform: translate(-50%, -50%) scale(var(--scale)) rotate(0deg);
      }

      100% {
        transform: translate(-50%, -50%) scale(1) rotate(var(--rotation));
      }
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="A">
      <img src="https://img01.yzcdn.cn/vant/apple-7.jpg" alt="">
    </div>
    <div class="B">
      <img src="https://img01.yzcdn.cn/vant/apple-2.jpg" alt="">
    </div>
    <div class="C">
      <img src="https://img01.yzcdn.cn/vant/apple-3.jpg" alt="">
    </div>
    <div class="D">
      <img src="https://img01.yzcdn.cn/vant/apple-4.jpg" alt="">
    </div>
    <div class="E">
      <img src="https://img01.yzcdn.cn/vant/apple-8.jpg" alt="">
    </div>
  </div>
</body>

</html>